package com.example.gss.mapper;

import com.example.gss.entity.Scholarship;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ScholarshipMapper {

    // 查询所有奖学金
    List<Scholarship> findAll();

    // 根据ID查询奖学金
    Scholarship findById(String id);

    // 添加奖学金
    int insert(Scholarship scholarship);

    // 更新奖学金
    int update(Scholarship scholarship);

    // 删除奖学金
    int delete(String id);

    // 按年份查询
    List<Scholarship> findByYear(Integer year);

    // 按级别查询
    List<Scholarship> findByLevel(String level);
}